home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 3 / Macwelt DVD 3.cdr / Audio / VC / Scripts / Produce Entire project / Produce Entire project
Encoding:
Text File  |  2001-09-23  |  1.6 KB  |  44 lines  |  [TEXT/ToyS]

  1. -- Either set the correct pathname below or leave it as it is,
  2. -- in which case the script will ask you for a folder name.
  3. -- (Courtesy of Eric Grant)
  4. property projectFolder : ""
  5.  
  6. if projectFolder is "" then set projectFolder to (choose folder with prompt "Select the project folder:")
  7. -- the alias is saved as a property and will be there next time
  8.  
  9. tell application "Virtual Composer"
  10.     activate
  11.     -- Set your repeats as appropriate
  12.     set repeats to false
  13.     -- Deactivate Animation
  14.     set animation to false
  15.     -- Set included subfolders as appropriate
  16.     --(for the E-motion Suite, you should set it to true.
  17.     --For the Lute Suite and the Goldberg Variations leave it as is
  18.     set subfolders to false
  19.     -- set pathname!
  20.     set folderString to projectFolder as string
  21.     -- note that we give the script a long timeout value,
  22.     -- so that all Documents can be saved without AppleScript timout errors
  23.     with timeout of 240 seconds
  24.         repeat with aFile in list folder projectFolder
  25.             set theFile to (a reference to file (folderString & aFile))
  26.             set theTargetFile to (a reference to file (folderString & aFile & ".aif"))
  27.             -- export'theFile'
  28.             export theFile in theTargetFile as "aiff"
  29.         end repeat
  30.     end timeout
  31.     
  32.     -- now play whatever was produced!
  33.     set temp to display dialog "Do you want to listen to the AIFFs in the project folder now?" buttons {"Yes", "No"} default button 1
  34.     
  35.     if button returned of temp = "Yes" then
  36.         repeat with aFile in list folder projectFolder
  37.             if ((aFile as text) contains ".aif") then
  38.                 set theFile to (a reference to file (folderString & aFile))
  39.                 play theFile
  40.             end if
  41.         end repeat
  42.     end if
  43. end tell
  44.